-
Notifications
You must be signed in to change notification settings - Fork 485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Faster FSM #1175
Use Faster FSM #1175
Conversation
6819bd6
to
5fe93d1
Compare
"""Guide to generate text in the language of a regular expression.""" | ||
|
||
initial_state = 0 | ||
class RegexGuide(CoreRegexGuide): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to keep the RegexGuide
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the cached implementation of RegexGuide
. Only __init__.py
is changed to enable caching.
def test_vllm_json_schema(model): | ||
prompt = "Output some JSON. " | ||
|
||
schema = """{ | ||
"title": "spam", | ||
"type": "object", | ||
"properties": { | ||
"foo" : {"type": "boolean"}, | ||
"bar": {"type": "string", "maxLength": 4} | ||
}, | ||
"required": ["foo", "bar"] | ||
} | ||
""" | ||
|
||
sampling_params = SamplingParams(temperature=0) | ||
result = generate.json(model, schema, whitespace_pattern="")( | ||
prompt, max_tokens=100, seed=10, sampling_params=sampling_params | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we removing the vLLM
integration tests in this PR? It should at least be a separate commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a mistake, reverted.
7873cfc
to
857b902
Compare
857b902
to
90f7144
Compare
LGTM! |
No description provided.